import argparse
from tools.run import run
import yaml


def parse_args():
    parser = argparse.ArgumentParser(description='Train a detector')
    parser.add_argument('--config', default='', help='config file path')
    parser.add_argument('--weights', default='', help='save checkpoints path')
    parser.add_argument('--phase', default='', help='train or test')
    args = parser.parse_args()
    return args

def get_config(config):
    with open(config, 'r') as stream:
        return yaml.load(stream)

def main():
    args = parse_args()
    run(args)

if __name__ == '__main__':
    main()
